<!--
 * @Author: 蔡继周
 * @Date: 2021-11-16 15:40:10
 * @LastEditTime: 2021-11-23 16:07:29
 * @LastEditors: Please set LastEditors
 * @Description: I have to do something...
 * @FilePath: \tableTep\src\components\FormTep\itemView\TimeSelectMoudel.vue
-->
<template>
  <el-form-item  :label="column.title ? column.title + '：' : ''" :prop="column.name" :rules="rules">
    <el-time-select
      v-model="value"
      :placeholder="`请输入${column.title}`"
      :picker-options="column.options"
      v-bind="column.definProps"
    />
  </el-form-item>
</template>
<script setup>
import { computed } from "vue";
import useComputedRule from "./../hooks/useComputedRule";
const emit = defineEmits(["update:model"]);
const props = defineProps({
  column: {
    type: Object,
    default: () => {},
  },
  model: {
    type: String,
    default: "",
  },
});
const { rules } = useComputedRule(props);
const value = computed({
  get: () => props.model,
  set: (val) => emit("update:model", val),
});
</script>
